<!--
 * @Author: your name
 * @Date: 2021-09-26 15:10:03
 * @LastEditTime: 2021-10-06 16:13:24
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \bigdatavue\src\views\others\test.vue
-->
<template>
    <div>
        <div ref="doms" class="doms">
            <Button
                style="marginright: 10px"
                type="primary"
                @click="clearWallmark"
            >
                clear
            </Button>
            <Button type="primary" @click="createDiv">create</Button>
            <h2>开启水印后系统会自动开启非法调试检测!!!</h2>
        </div>
    </div>
</template>

<script lang="ts">
import { defineComponent, computed, ref, unref } from 'vue'
import { Button } from 'ant-design-vue'
import { Wallmark, getMarkStatus } from '@/hooks/useWatermark'

export default defineComponent({
    name: 'Flowechart',
    components: {
        Button,
    },
    setup() {
        let wm = new Wallmark()
        let status = computed(() => unref(getMarkStatus()))
        const createDiv = () => {
            wm.createDiv('韶华倾负')
        }
        const clearWallmark = () => {
            wm.clearWallmark()
        }

        return {
            createDiv,
            status,
            clearWallmark,
        }
    },
})
</script>

<style scoped>
.doms {
  position: relative;
  width: 100vw;

  display: flex;
}
h2 {
  margin-left: 10px;
}
</style>
